<%--
  Created by IntelliJ IDEA.
  User: lkl
  Date: 2024/7/1
  Time: 10:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="jakarta.tags.core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
    <base href="<%=basePath%>">
    <link rel="apple-touch-icon" sizes="76x76" href="./assets/img/123.png">
    <link rel="icon" type="image/png" href="./assets/img/123.png">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <title>NEFU CCEC SE</title>
    <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'
          name='viewport'/>
    <!-- Google Font -->
    <link href="https://fonts.googleapis.com/css?family=Playfair+Display:400,700|Source+Sans+Pro:400,600,700"
          rel="stylesheet">
    <!-- Font Awesome Icons -->

    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
          integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
    <link rel="stylesheet" href="Bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="Bootstrap/font/bootstrap-icons.css">
    <!-- Main CSS -->
    <link  rel="stylesheet" href="assets/css/main.css"/>
    <link rel="stylesheet" href="assets/css/notice.css">
    <style>
        .custom-link
        {
            transition: transform 0.3s ease;
        }

        .custom-link:hover {
            color: #025d45 !important;
            text-decoration: underline !important;
            font-size: 24px;
        }
        /* 定义过渡效果 */
        a{
            transition: transform 0.3s ease;
            /* 可以添加其他基础样式，如颜色、边框等 */
        }

        /* 定义悬浮时的样式 */
        a:hover {
            transform: scale(1.2); /* 你可以根据需要调整这个值 */
            text-decoration: none!important;

        }
    </style>
</head>
<body>
<!--------------------------------------
NAVBAR
--------------------------------------->
<!--导航-->
<nav class="topnav navbar navbar-expand-lg navbar-light bg-white fixed-top">
    <div class="container">
        <a class="navbar-brand" href="index.html"><strong>NEFU CCEC SE</strong></a>
        <button class="navbar-toggler collapsed" type="button" data-toggle="collapse" data-target="#navbarColor02" aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="navbar-collapse collapse" id="navbarColor02" style="">
            <ul class="navbar-nav mr-auto d-flex align-items-center">
                <li class="nav-item">
                    <a class="nav-link" href="introduction">专业介绍</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="lab">实验室</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="teacher">教师队伍</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="job">就业指南</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="listNews">新闻</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="listNotice">公告</a>
                </li>
            </ul>
            <ul class="navbar-nav ml-auto d-flex align-items-center">
                <li class="nav-item highlight">
                    <a class="nav-link" href="login">登录</a>
                </li>
            </ul>
        </div>
    </div>
</nav>

<!-- End Navbar -->


<!--------------------------------------
HEADER
--------------------------------------->

<!-- End Header -->

<%--<div>--%>
<%--    全部公告--%>
<%--    <ul>--%>
<%--        <c:forEach items="${notices}" var="n">--%>
<%--            <li><a href="getnotice?nid=${n.nid}">${n.title}</a></li>--%>
<%--            <li>${n.author}</li>--%>
<%--            <li>${n.dateTime}</li>--%>
<%--            <li>${n.content}</li>--%>
<%--        </c:forEach>--%>
<%--    </ul>--%>
<%--</div>--%>

<%--<form action="updateNotice" method="post">--%>
<%--    修改指定公告--%>
<%--    <select name="nid">--%>
<%--        <c:forEach items="${notices}" var="n">--%>
<%--            <option  value="${n.nid}">${n.title}</option>--%>
<%--        </c:forEach>--%>
<%--    </select>--%>
<%--    新title <input type="text" name="newtitle"> <br>--%>
<%--    <button type="submit">提交</button>--%>
<%--</form>--%>


<div class="container">
    <div class="row justify-content-between">
        <div class="col-md-12">
            <h3 class="font-weight-bold spanborder"><span>通知公告</span></h3>
            <ol class="list-featured">
                <c:forEach items="${notices}" var="n">
                    <li>
                    <span>
                        <h6 class="font-weight-bold">
                        <a href="getnotice?nid=${n.nid}" class="text-dark custom-link">${n.title}</a>
                        </h6>
                          <div class="card-text text-muted small">
                                  ${n.author}
                          </div>
                        <small class="text-muted">${n.dateTime}</small>
                        <c:set var="partialContent" value="${fn:substring(n.content, 0, 85)}" />
                        <p>${partialContent}...</p>
                    </span>
                    </li>
                </c:forEach>
            </ol>
        </div>

    </div>

</div>

<!--------------------------------------
FOOTER
--------------------------------------->
<div class="footer border-top">
    <div class="wrapper">
        <!--		服务-->
        <div class="service">
            服务于NEFU CCEC SE
        </div>
    </div>
    <!--		版权-->
    <div class="copyright">
        版权所有 2024 东北林业大学计算机与控制工程学院软件工程专业
    </div>
    <div class="maker">
        Copyright &copy; Li KunLong
    </div>
</div>
<!-- End Footer -->

<!--------------------------------------
JAVASCRIPTS
--------------------------------------->
<script src="./assets/js/vendor/jquery.min.js" type="text/javascript"></script>
<script src="./assets/js/vendor/popper.min.js" type="text/javascript"></script>
<script src="./assets/js/vendor/bootstrap.min.js" type="text/javascript"></script>
<script src="./assets/js/functions.js" type="text/javascript"></script>
<script src="./Bootstrap/js/bootstrap.min.js"></script>


</body>
</html>

